
#ifndef _MEMBER_BControl_H_
#define _MEMBER_BControl_H_

#include <BControl>
#include <BViewer>
#include <BCamera>

#define control_member(control)		((member_BControl*)((BControl*)control)->_ptr)

namespace BWE
{
	class member_BControl
	{
	public:
		member_BControl(BControl* controlder);
		~member_BControl();

		void setViewer(BViewer* viewer);

		inline void event(const BEvent& event)
		{
			boss->event(event);
		}
		inline void paint(BPainter& painter)
		{
			boss->paint(painter);
		}
		inline void render(BRender& render)
		{
			boss->render(render);
		}
		inline void fresh(const BEvent& event)
		{
			boss->event(event);
		}

	public:
		BControl*				boss;
		BViewer*				viewer;
		BControl*				master;
		BArray<BControlHolder>	slaves;
	};
}

#endif
